/*! \file SimpleConfig.h
 *	\brief <write description for SimpleConfig.h>
 *
 *	created:	2009/11/24
 *	created:	24:11:2009   13:50
 *	filename: 	o:\gag-engine\libs\config\SimpleConfig.h
 *	file path:	o:\gag-engine\libs\config
 *	file base:	SimpleConfig
 *	file ext:	h
 *	author:		Vitalii Trubchaninov
 *				venngraydog@gmail.com
 */

#ifndef _CONFIG_SIMPLECONFIG_H_
#define _CONFIG_SIMPLECONFIG_H_

#pragma once

#include "BaseConfig.h"

#include <core/Map.h>
#include <core/string.h>

namespace tt{
namespace config{

class SimpleConfig : public BaseConfig
{
	//TT_DECLARE_SELF_AND_BASE(SimpleConfig, BaseConfig);

public:
	SimpleConfig(void);
	virtual ~SimpleConfig(void);

private:
	virtual void onSetInt(const String& key, Int value);
	virtual Int onGetInt(const String& key, Int default_value = 0);

	virtual void onSetUInt(const String& key, UInt value);
	virtual UInt onGetUInt(const String& key, UInt default_value = 0);

	virtual void onSetString(const String& key, const String& value);
	virtual String onGetString(const String& key);
	virtual const String& onGetString(const String& key, const String& default_value );

	virtual void onSetBool(const String& key, bool value);
	virtual bool onGetBool(const String& key, bool default_value = false );

private:
	typedef core::Map<String, Int>::Type Ints;
	typedef core::Map<String, String>::Type Strings;
	typedef core::Map<String, bool>::Type Bools;

private:
	Ints m_ints;
	Strings m_strings;
	Bools m_bools;
};

} //namespace config
} //namespace tt

#endif //_CONFIG_SIMPLECONFIG_H_
